package com.dunka.demo.service;

import com.dunka.demo.mapper.MenuMapper;
import com.dunka.demo.pojo.Menu;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author Dunka
 * @Description
 * @Date 15:14   2019/7/25
 * @ClassName MenuService
 */
@Service
public class MenuService {
    @Autowired
    private MenuMapper menuMapper;

    public List<Menu> getAllMenu(){
        return menuMapper.getAllMenu();
    }

    public boolean updateMenu(Menu menu){
        return menuMapper.updateMenu(menu);
    }

    public boolean deleteMenu(int id){
        return menuMapper.deleteMenu(id);
    }

    public boolean addMenu(Menu menu){
        return menuMapper.addMenu(menu);
    }

    public Menu getMenuById(int id){
        return menuMapper.getMenuById(id);
    }
}
